X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be8dc178e77d0b46189bbd8e33a216a9b90942..refs/tags/wordpress-2.8.2:/wp-admin/theme-editor.php?file=%3C%3Fphp%20echo diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 361f26b6..c7343a7a 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -22,8 +22,7 @@ if (empty($theme)) { $theme = get_current_theme(); } else { $theme = stripslashes($theme); - } - +} if ( ! isset($themes[$theme]) ) wp_die(__('The requested theme does not exist.')); @@ -65,8 +64,8 @@ case 'update': } $location = wp_kses_no_null($location); - $strip = array('%0d', '%0a'); - $location = str_replace($strip, '', $location); + $strip = array('%0d', '%0a', '%0D', '%0A'); + $location = _deep_replace($strip, $location); header("Location: $location"); exit(); @@ -81,13 +80,26 @@ default: update_recently_edited($file); - if (!is_file($real_file)) + if ( !is_file($real_file) ) $error = 1; - if (!$error && filesize($real_file) > 0) { + if ( !$error && filesize($real_file) > 0 ) { $f = fopen($real_file, 'r'); $content = fread($f, filesize($real_file)); - $content = htmlspecialchars($content); + + if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) { + $functions = wp_doc_link_parse( $content ); + + $docs_select = ''; + } + + $content = htmlspecialchars( $content ); + $codepress_lang = codepress_get_lang($real_file); } ?> @@ -100,9 +112,14 @@ $desc_header = ( $description != $file_show ) ? "$description ( ?>
-

-
-
+

+ +
+
+ +
+
+ - +
-
-
- -

-
-
-

+ +
+

($template_show)" : "$description"; @@ -158,11 +171,11 @@ if ($allowed_files) :
  • &theme=">
  • -

    +

      ($style_show)" : "$description"; @@ -177,38 +190,44 @@ if ($allowed_files) :
    - -
    + + + -
    +
    - - + +
    + +
    + + + +
    +

    "; + echo ""; ?>

    the Codex for more information.'); ?>

    - - +

    ' . __('Oops, no such file exists! Double check the name and try again, merci.') . '

    '; } - ?> -
     
    +?> +
    +include("admin-footer.php");